<template>
	<view>

		<web-view :src="url"></web-view>
		<loading :shadeShow="shadeShow" :shadeClick="false" :backgroundColor="backgroundColor" :width="width"
			:height="height" ref="loadings" :custom="false" :type="1" @callback="callback">
		</loading>
	</view>
</template>

<script>
	import loading from '@/components/xuan-loading/xuan-loading.vue'
	export default {
		data() {
			return {
				url: '',
				width: '150rpx',
				height: '100rpx',
				shadeShow: true,
				backgroundColor: "transparent",
				themeColor: '#525EF9',
				logoUrl: '../../static/l.png',
			}
		},
		components: {
			loading
		},
		onBackPress(event) {
		
			uni.switchTab({
				url: '/pages/home/index'
			});
			return true;
		},
		onLoad(item) {
			let that = this;
			setTimeout(() => {
				that.getloading()
			}, 200)
			// 传入需要跳转的链接 使用web-view标签进行跳转
			this.url = decodeURIComponent(item.url)
			setTimeout(() => {
				that.$refs.loadings.close();
			}, 5000)
			
			
		},
		methods: {
			getloading() {
				this.$refs.loadings.open();
			},
		}
	}
</script>
